package treazy.ultimate.stats;

public class Player {
	private int _id;
	private String _name;
    private int _goals;
    private int _assists;
    private int _points_played;
    private int _turns;
    private String _nickname;
    private String _currentTeam;
    
    /** Player object constructor
     * 
     * @param name The name of player
     * @param currentTeam The team that player is currently in season with
     */
    public Player(String name, String currentTeam){
    	setAttributes(name, 0, 0, 0, 0, null, currentTeam);
    }
    
    /** Constructor from player data recieved from database
     * 
     * @param name The players name
     * @param goals The number of goals the player has scored
     * @param assists The number of assists the player has thrown
     * @param pointsplayed The number of points played
     * @param turns The number of turns caused by the player
     * @param nickname The player's nickname
     * @param currentTeam The team the player is currently in season with
     */
    public Player(String name, int goals, int assists, int pointsplayed, int turns, String nickname, String currentTeam){
    	setAttributes(name, goals, assists, pointsplayed, turns, nickname, currentTeam);
    }
    
    private void setAttributes(String name, int goals, int assists, int points_played, int turns, String nickname, String currentTeam){
    	setName(name);
    	setGoals(goals);
    	setAssists(assists);
    	setPointsPlayed(points_played);
    	setTurns(turns);
    	setNickname(nickname);
    	setCurrentTeam(currentTeam);
    }
    
	public int getID() {
		return _id;
	}

	public void setID(int id) {
		_id = id;
	}

	public String getName() {
		return _name;
	}

	public void setName(String name) {
		_name = name;
	}

	public int getGoals() {
		return _goals;
	}

	public void setGoals(int goals) {
		_goals = goals;
	}

	public int getAssists() {
		return _assists;
	}

	public void setAssists(int assists) {
		_assists = assists;
	}

	public int getPointsPlayed() {
		return _points_played;
	}

	public void setPointsPlayed(int points_played) {
		_points_played = points_played;
	}

	public int getTurns() {
		return _turns;
	}

	public void setTurns(int turns) {
		_turns = turns;
	}

	public String getNickname() {
		return _nickname;
	}

	public void setNickname(String nickname) {
		_nickname = nickname;
	}

	public String getCurrentTeam() {
		return _currentTeam;
	}

	public void setCurrentTeam(String currentTeam) {
		_currentTeam = currentTeam;
	}
	
}
